home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-02-27 | 10.6 KB | [ TEXT/KAHL]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
Confidence Program Detection Match Type Support
66%
dexvert
Compact Compressed (Unix) (archive/compact)
ext
Supported
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, inited, Sat Feb 27 16:18:14 1993, modified Sat Feb 27 16:18:14 1993, creator Think C, type ASCII, 10203 bytes "Sandstorm.c" , at 0x285b 476 bytes resource
default (weak)
99%
file
data
default
74%
TrID
Macintosh plain text (MacBinary)
default
25%
TrID
MacBinary 2
default (weak)
100%
siegfried
fmt/1762 MacBinary (II)
default
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ KAHL]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 0b 53 61 6e 64 73 74 | 6f 72 6d 2e 63 00 00 00 |..Sandst|orm.c...| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......| |00000050| 00 00 00 00 00 27 db 00 | 00 01 dc a7 b5 8b 16 a7 |.....'..|........| |00000060| b5 8b 16 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 dc ec 00 00 |........|........| |00000080| 2f 2a 0d 53 61 6e 64 73 | 74 6f 72 6d 2e 63 0d 43 |/*.Sands|torm.c.C| |00000090| 6f 70 79 72 69 67 68 74 | 20 a9 20 31 39 38 39 2d |opyright| . 1989-| |000000a0| 31 39 39 33 20 44 65 6e | 69 73 20 50 65 6c 6c 69 |1993 Den|is Pelli| |000000b0| 0d 54 68 69 73 20 70 72 | 6f 67 72 61 6d 20 73 68 |.This pr|ogram sh| |000000c0| 6f 77 73 20 61 20 6e 6f | 69 73 65 20 6d 6f 76 69 |ows a no|ise movi| |000000d0| 65 2c 20 61 20 64 79 6e | 61 6d 69 63 20 72 61 6e |e, a dyn|amic ran| |000000e0| 64 6f 6d 20 63 68 65 63 | 6b 65 72 62 6f 61 72 64 |dom chec|kerboard| |000000f0| 2c 20 61 74 20 36 36 2e | 37 20 48 7a 21 0d 54 68 |, at 66.|7 Hz!.Th| |00000100| 65 20 6b 65 79 20 72 6f | 75 74 69 6e 65 2c 20 77 |e key ro|utine, w| |00000110| 68 69 63 68 20 73 68 6f | 77 73 20 65 61 63 68 20 |hich sho|ws each | |00000120| 66 72 61 6d 65 2c 20 69 | 73 20 74 68 65 20 56 69 |frame, i|s the Vi| |00000130| 64 65 6f 54 6f 6f 6c 62 | 6f 78 20 72 6f 75 74 69 |deoToolb|ox routi| |00000140| 6e 65 20 43 6f 70 79 42 | 69 74 73 51 75 69 63 6b |ne CopyB|itsQuick| |00000150| 6c 79 28 29 2e 0d 0d 54 | 6f 20 67 65 74 20 61 20 |ly()...T|o get a | |00000160| 74 72 75 65 20 69 6d 70 | 72 65 73 73 69 6f 6e 20 |true imp|ression | |00000170| 6f 66 20 77 68 69 74 65 | 20 6e 6f 69 73 65 20 79 |of white| noise y| |00000180| 6f 75 20 6e 65 65 64 20 | 74 6f 20 63 6f 6d 70 75 |ou need |to compu| |00000190| 74 65 20 6c 6f 74 73 20 | 6f 66 20 6e 6f 69 73 65 |te lots |of noise| |000001a0| 0d 66 72 61 6d 65 73 2c | 20 73 6f 20 67 69 76 65 |.frames,| so give| |000001b0| 20 69 74 20 61 73 20 6d | 75 63 68 20 6d 65 6d 6f | it as m|uch memo| |000001c0| 72 79 20 61 73 20 79 6f | 75 20 63 61 6e 2c 20 65 |ry as yo|u can, e| |000001d0| 2e 67 2e 20 33 20 4d 42 | 2e 20 28 55 73 65 20 74 |.g. 3 MB|. (Use t| |000001e0| 68 65 20 46 69 6e 64 65 | 72 20 47 65 74 0d 49 6e |he Finde|r Get.In| |000001f0| 66 6f 20 63 6f 6d 6d 61 | 6e 64 2e 29 20 53 61 6e |fo comma|nd.) San| |00000200| 64 73 74 6f 72 6d 20 66 | 69 6c 6c 73 20 61 6c 6c |dstorm f|ills all| |00000210| 20 74 68 65 20 6d 65 6d | 6f 72 79 20 79 6f 75 20 | the mem|ory you | |00000220| 67 69 76 65 20 69 74 20 | 77 69 74 68 20 70 72 65 |give it |with pre| |00000230| 2d 63 6f 6d 70 75 74 65 | 64 0d 6e 6f 69 73 65 2c |-compute|d.noise,| |00000240| 20 77 68 69 63 68 20 64 | 6f 65 73 20 74 61 6b 65 | which d|oes take| |00000250| 20 73 6f 6d 65 20 74 69 | 6d 65 2e 20 45 61 63 68 | some ti|me. Each| |00000260| 20 64 69 73 70 6c 61 79 | 65 64 20 66 72 61 6d 65 | display|ed frame| |00000270| 20 69 73 20 74 61 6b 65 | 6e 20 66 72 6f 6d 20 61 | is take|n from a| |00000280| 20 72 61 6e 64 6f 6d 0d | 6f 66 66 73 65 74 20 77 | random.|offset w| |00000290| 69 74 68 69 6e 20 74 68 | 61 74 20 6e 6f 69 73 65 |ithin th|at noise| |000002a0| 2e 0d 0d 4e 6f 74 65 3a | 20 74 68 65 20 61 6d 6f |...Note:| the amo| |000002b0| 75 6e 74 20 6f 66 20 64 | 61 74 61 20 74 68 61 74 |unt of d|ata that| |000002c0| 20 68 61 73 20 74 6f 20 | 62 65 20 74 72 61 6e 73 | has to |be trans| |000002d0| 66 65 72 65 64 20 62 79 | 20 43 6f 70 79 42 69 74 |fered by| CopyBit| |000002e0| 73 51 75 69 63 6b 6c 79 | 28 29 20 69 6e 20 65 61 |sQuickly|() in ea| |000002f0| 63 68 0d 66 72 61 6d 65 | 20 69 73 20 70 72 6f 70 |ch.frame| is prop| |00000300| 6f 72 74 69 6f 6e 61 6c | 20 74 6f 20 77 69 6e 64 |ortional| to wind| |00000310| 6f 77 20 61 72 65 61 20 | 61 6e 64 20 74 68 65 20 |ow area |and the | |00000320| 62 69 74 73 2f 70 69 78 | 65 6c 20 6f 66 20 74 68 |bits/pix|el of th| |00000330| 65 20 64 69 73 70 6c 61 | 79 2c 20 61 73 20 73 65 |e displa|y, as se| |00000340| 74 20 62 79 0d 43 6f 6e | 74 72 6f 6c 20 50 61 6e |t by.Con|trol Pan| |00000350| 65 6c 20 4d 6f 6e 69 74 | 6f 72 73 2e 20 41 74 20 |el Monit|ors. At | |00000360| 38 20 62 69 74 73 2f 70 | 69 78 65 6c 20 74 68 65 |8 bits/p|ixel the| |00000370| 20 6d 61 78 69 6d 75 6d | 20 77 69 6e 64 6f 77 20 | maximum| window | |00000380| 74 68 61 74 20 63 61 6e | 20 62 65 20 75 70 64 61 |that can| be upda| |00000390| 74 65 64 0d 61 74 20 36 | 36 20 48 7a 20 69 73 20 |ted.at 6|6 Hz is | |000003a0| 61 62 6f 75 74 20 31 39 | 32 78 31 39 32 2e 20 41 |about 19|2x192. A| |000003b0| 74 20 31 20 62 69 74 2f | 70 69 78 65 6c 20 77 65 |t 1 bit/|pixel we| |000003c0| 20 63 61 6e 20 64 6f 20 | 61 74 20 6c 65 61 73 74 | can do |at least| |000003d0| 20 34 38 30 78 36 34 30 | 2e 0d 0d 53 61 6e 64 73 | 480x640|...Sands| |000003e0| 74 6f 72 6d 2d 2d 6e 6f | 74 20 43 6f 70 79 42 69 |torm--no|t CopyBi| |000003f0| 74 73 51 75 69 63 6b 6c | 79 2d 2d 63 61 6c 6c 73 |tsQuickl|y--calls| |00000400| 20 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 28 29 | WaitNex|tEvent()| |00000410| 20 62 65 66 6f 72 65 20 | 65 61 63 68 0d 66 72 61 | before |each.fra| |00000420| 6d 65 2c 20 69 6e 20 6f | 72 64 65 72 20 74 6f 20 |me, in o|rder to | |00000430| 62 65 20 72 65 73 70 6f | 6e 73 69 76 65 20 74 6f |be respo|nsive to| |00000440| 20 74 68 65 20 6d 6f 75 | 73 65 2c 20 61 6e 64 20 | the mou|se, and | |00000450| 74 68 69 73 20 72 65 73 | 75 6c 74 73 20 69 6e 20 |this res|ults in | |00000460| 6f 63 63 61 73 69 6f 6e | 61 6c 0d 70 61 75 73 65 |occasion|al.pause| |00000470| 73 20 61 73 20 74 68 65 | 20 4d 61 63 20 74 61 6b |s as the| Mac tak| |00000480| 65 73 20 74 69 6d 65 20 | 6f 75 74 20 74 6f 20 64 |es time |out to d| |00000490| 6f 20 76 61 72 69 6f 75 | 73 20 63 68 6f 72 65 73 |o variou|s chores| |000004a0| 2e 0d 0d 0d 48 49 53 54 | 4f 52 59 3a 0d 31 31 2f |....HIST|ORY:.11/| |000004b0| 32 33 2f 38 38 20 64 67 | 70 20 64 65 72 69 76 65 |23/88 dg|p derive| |000004c0| 64 20 66 72 6f 6d 20 74 | 72 75 65 6e 6f 69 73 65 |d from t|ruenoise| |000004d0| 44 65 6d 6f 32 2e 63 0d | 34 2f 37 2f 38 39 20 64 |Demo2.c.|4/7/89 d| |000004e0| 67 70 20 09 49 20 72 65 | 6d 6f 76 65 64 20 6e 65 |gp .I re|moved ne| |000004f0| 61 72 6c 79 20 61 6c 6c | 20 74 68 65 20 68 61 72 |arly all| the har| |00000500| 64 77 61 72 65 20 64 65 | 70 65 6e 64 65 6e 63 69 |dware de|pendenci| |00000510| 65 73 2e 20 54 68 65 20 | 6f 6e 6c 79 20 72 65 6d |es. The |only rem| |00000520| 61 69 6e 69 6e 67 20 6f | 6e 65 0d 09 09 09 69 73 |aining o|ne....is| |00000530| 20 74 68 65 20 63 61 6c | 6c 20 74 6f 20 4e 65 77 | the cal|l to New| |00000540| 46 69 65 6c 64 54 46 42 | 28 29 2e 20 49 20 64 6f |FieldTFB|(). I do| |00000550| 6e 27 74 20 6b 6e 6f 77 | 20 68 6f 77 20 74 6f 20 |n't know| how to | |00000560| 67 65 74 20 72 69 64 20 | 6f 66 20 74 68 61 74 2c |get rid |of that,| |00000570| 20 73 68 6f 72 74 20 6f | 66 0d 09 09 09 77 72 69 | short o|f....wri| |00000580| 74 69 6e 67 20 61 20 56 | 42 4c 20 74 61 73 6b 2e |ting a V|BL task.| |00000590| 0d 39 2f 32 39 2f 38 39 | 20 64 67 70 20 49 27 76 |.9/29/89| dgp I'v| |000005a0| 65 20 6e 65 61 72 6c 79 | 20 75 70 64 61 74 65 64 |e nearly| updated| |000005b0| 20 74 68 69 73 20 74 6f | 20 54 48 49 4e 4b 20 43 | this to| THINK C| |000005c0| 20 34 2e 30 2c 20 62 75 | 74 20 74 68 65 20 63 61 | 4.0, bu|t the ca| |000005d0| 6c 6c 20 74 6f 20 54 69 | 63 6b 43 6f 75 6e 74 2c |ll to Ti|ckCount,| |000005e0| 20 0d 09 09 09 72 65 66 | 65 72 73 20 74 6f 20 74 | ....ref|ers to t| |000005f0| 68 65 20 6f 6c 64 20 70 | 72 6f 66 69 6c 65 72 2c |he old p|rofiler,| |00000600| 20 61 6e 64 20 49 20 64 | 6f 6e 27 74 20 68 61 76 | and I d|on't hav| |00000610| 65 20 74 69 6d 65 20 74 | 6f 20 66 69 67 75 72 65 |e time t|o figure| |00000620| 20 74 68 69 73 20 6f 75 | 74 20 6e 6f 77 2e 0d 31 | this ou|t now..1| |00000630| 30 2f 32 38 2f 38 39 20 | 64 67 70 20 49 20 72 65 |0/28/89 |dgp I re| |00000640| 70 6c 61 63 65 64 20 74 | 68 65 20 63 61 6c 6c 20 |placed t|he call | |00000650| 74 6f 20 4e 65 77 46 69 | 65 6c 64 54 46 42 28 29 |to NewFi|eldTFB()| |00000660| 20 62 79 20 61 20 63 61 | 6c 6c 20 74 6f 20 47 44 | by a ca|ll to GD| |00000670| 53 65 74 45 6e 74 72 69 | 65 73 28 29 20 77 68 69 |SetEntri|es() whi| |00000680| 63 68 0d 09 09 09 69 73 | 20 61 20 64 65 76 69 63 |ch....is| a devic| |00000690| 65 2d 69 6e 64 65 70 65 | 6e 64 65 6e 74 20 77 61 |e-indepe|ndent wa| |000006a0| 79 20 74 6f 20 77 61 69 | 74 20 66 6f 72 20 74 68 |y to wai|t for th| |000006b0| 65 20 65 6e 64 20 6f 66 | 20 66 72 61 6d 65 2e 0d |e end of| frame..| |000006c0| 37 2f 31 39 2f 39 30 20 | 64 67 70 20 55 6e 66 6f |7/19/90 |dgp Unfo| |000006d0| 72 74 75 6e 61 74 65 6c | 79 20 74 68 65 20 62 75 |rtunatel|y the bu| |000006e0| 69 6c 74 2d 69 6e 20 76 | 69 64 65 6f 20 6f 6e 20 |ilt-in v|ideo on | |000006f0| 74 68 65 20 4d 61 63 20 | 49 49 63 69 20 69 73 20 |the Mac |IIci is | |00000700| 62 75 67 67 79 20 61 6e | 64 20 64 6f 65 73 6e 27 |buggy an|d doesn'| |00000710| 74 0d 09 09 09 73 75 70 | 70 6f 72 74 20 74 68 65 |t....sup|port the| |00000720| 20 73 65 74 45 6e 74 72 | 69 65 73 20 63 61 6c 6c | setEntr|ies call| |00000730| 2e 0d 31 30 2f 31 37 2f | 39 30 20 64 67 70 20 59 |..10/17/|90 dgp Y| |00000740| 61 79 2e 20 46 69 6e 61 | 6c 6c 79 20 72 65 6d 6f |ay. Fina|lly remo| |00000750| 76 65 64 20 6c 61 73 74 | 20 62 75 67 73 21 20 52 |ved last| bugs! R| |00000760| 65 70 6c 61 63 65 64 20 | 53 6c 6f 74 54 6f 53 63 |eplaced |SlotToSc| |00000770| 72 65 65 6e 44 65 76 69 | 63 65 28 29 20 62 79 0d |reenDevi|ce() by.| |00000780| 09 09 09 41 64 64 72 65 | 73 73 54 6f 53 63 72 65 |...Addre|ssToScre| |00000790| 65 6e 44 65 76 69 63 65 | 28 29 20 69 6e 20 6f 72 |enDevice|() in or| |000007a0| 64 65 72 20 74 6f 20 6d | 61 6b 65 20 69 74 20 63 |der to m|ake it c| |000007b0| 6f 6d 70 61 74 69 62 6c | 65 20 77 69 74 68 20 62 |ompatibl|e with b| |000007c0| 75 69 6c 74 2d 69 6e 20 | 76 69 64 65 6f 0d 09 09 |uilt-in |video...| |000007d0| 09 6f 6e 20 4d 61 63 20 | 49 49 63 69 2c 20 49 49 |.on Mac |IIci, II| |000007e0| 73 69 2c 20 61 6e 64 20 | 4c 43 2e 20 52 65 6d 6f |si, and |LC. Remo| |000007f0| 76 65 64 20 74 68 65 20 | 73 65 74 45 6e 74 72 69 |ved the |setEntri| |00000800| 65 73 20 63 61 6c 6c 20 | 66 6f 72 20 63 6f 6d 70 |es call |for comp| |00000810| 61 74 69 62 69 6c 69 74 | 79 0d 09 09 09 77 69 74 |atibilit|y....wit| |00000820| 68 20 4d 61 63 20 49 49 | 63 69 20 62 75 69 6c 74 |h Mac II|ci built| |00000830| 2d 69 6e 20 76 69 64 65 | 6f 2e 28 41 70 70 6c 65 |-in vide|o.(Apple| |00000840| 20 68 61 73 20 61 63 6b | 6e 6f 77 6c 65 64 67 65 | has ack|nowledge| |00000850| 64 20 62 75 67 2c 20 62 | 75 74 20 62 75 67 20 69 |d bug, b|ut bug i| |00000860| 73 0d 09 09 09 73 74 69 | 6c 6c 20 70 72 65 73 65 |s....sti|ll prese| |00000870| 6e 74 20 69 6e 20 53 79 | 73 74 65 6d 20 36 2e 30 |nt in Sy|stem 6.0| |00000880| 37 2e 29 20 46 69 78 65 | 64 20 62 75 67 20 77 68 |7.) Fixe|d bug wh| |00000890| 65 72 65 62 79 20 72 65 | 73 69 7a 69 6e 67 20 77 |ereby re|sizing w| |000008a0| 69 6e 64 6f 77 20 6f 6e | 20 6f 74 68 65 72 0d 09 |indow on| other..| |000008b0| 09 09 74 68 61 6e 20 74 | 68 65 20 6d 61 69 6e 20 |..than t|he main | |000008c0| 73 63 72 65 65 6e 20 6c | 65 66 74 20 77 69 6e 64 |screen l|eft wind| |000008d0| 6f 77 20 62 6c 61 6e 6b | 20 75 6e 74 69 6c 20 69 |ow blank| until i| |000008e0| 74 20 77 61 73 20 64 72 | 61 67 67 65 64 20 61 67 |t was dr|agged ag| |000008f0| 61 69 6e 2e 20 0d 09 09 | 09 52 65 6d 6f 76 65 64 |ain. ...|.Removed| |00000900| 20 75 6e 75 73 65 64 20 | 76 61 72 69 61 62 6c 65 | unused |variable| |00000910| 73 2e 20 41 64 64 65 64 | 20 7a 6f 6f 6d 20 62 6f |s. Added| zoom bo| |00000920| 78 2e 0d 31 30 2f 31 38 | 2f 39 30 20 64 67 70 20 |x..10/18|/90 dgp | |00000930| 54 69 64 69 65 64 20 75 | 70 2e 20 4e 6f 77 20 7a |Tidied u|p. Now z| |00000940| 6f 6f 6d 73 20 6f 6e 74 | 6f 20 73 63 72 65 65 6e |ooms ont|o screen| |00000950| 20 77 69 74 68 20 6c 61 | 72 67 65 73 74 20 69 6e | with la|rgest in| |00000960| 74 65 72 73 65 63 74 69 | 6f 6e 2c 20 61 6e 64 20 |tersecti|on, and | |00000970| 7a 6f 6f 6d 73 20 62 61 | 63 6b 0d 09 09 09 74 6f |zooms ba|ck....to| |00000980| 20 6f 72 69 67 69 6e 61 | 6c 20 73 69 7a 65 2e 20 | origina|l size. | |00000990| 55 73 65 73 20 61 73 20 | 6d 75 63 68 20 6d 65 6d |Uses as |much mem| |000009a0| 6f 72 79 20 61 73 20 75 | 73 65 72 20 61 6c 6c 6f |ory as u|ser allo| |000009b0| 63 61 74 65 73 20 74 6f | 20 70 72 6f 67 72 61 6d |cates to| program| |000009c0| 2e 20 0d 09 09 09 57 69 | 6e 64 6f 77 20 6e 6f 77 |. ....Wi|ndow now| |000009d0| 20 61 6c 77 61 79 73 20 | 63 6f 6e 66 69 6e 65 73 | always |confines| |000009e0| 20 69 74 73 65 6c 66 20 | 74 6f 20 61 20 73 69 6e | itself |to a sin| |000009f0| 67 6c 65 20 73 63 72 65 | 65 6e 2c 20 62 75 74 20 |gle scre|en, but | |00000a00| 63 61 6e 20 62 65 20 64 | 72 61 67 67 65 64 0d 09 |can be d|ragged..| |00000a10| 09 09 61 6e 79 77 68 65 | 72 65 2e 0d 31 30 2f 32 |..anywhe|re..10/2| |00000a20| 30 2f 39 30 20 64 67 70 | 20 43 6f 70 69 65 64 20 |0/90 dgp| Copied | |00000a30| 63 6f 64 65 20 66 72 6f | 6d 20 56 69 64 65 6f 54 |code fro|m VideoT| |00000a40| 65 73 74 20 74 6f 20 63 | 6c 6f 73 65 20 77 69 6e |est to c|lose win| |00000a50| 64 6f 77 20 61 6e 64 20 | 71 75 69 74 20 6f 6e 20 |dow and |quit on | |00000a60| 43 6f 6d 6d 61 6e 64 2d | 57 20 6f 72 0d 09 09 09 |Command-|W or....| |00000a70| 43 6f 6d 6d 61 6e 64 2d | 2e 20 50 72 65 76 65 6e |Command-|. Preven| |00000a80| 74 65 64 20 77 69 6e 64 | 6f 77 20 74 69 74 6c 65 |ted wind|ow title| |00000a90| 20 62 61 72 20 66 72 6f | 6d 20 62 65 69 6e 67 20 | bar fro|m being | |00000aa0| 68 69 64 64 65 6e 20 62 | 65 68 69 6e 64 20 74 68 |hidden b|ehind th| |00000ab0| 65 20 6d 65 6e 75 0d 09 | 09 09 62 61 72 2e 0d 37 |e menu..|..bar..7| |00000ac0| 2f 32 32 2f 39 31 09 64 | 67 70 09 4d 61 64 65 20 |/22/91.d|gp.Made | |00000ad0| 63 6f 6d 70 61 74 69 62 | 6c 65 20 77 69 74 68 20 |compatib|le with | |00000ae0| 4d 50 57 20 43 2e 20 54 | 68 69 73 20 72 65 71 75 |MPW C. T|his requ| |00000af0| 69 72 65 64 20 63 68 61 | 6e 67 69 6e 67 20 49 4e |ired cha|nging IN| |00000b00| 54 5f 4d 41 58 20 74 6f | 20 53 48 52 54 5f 4d 41 |T_MAX to| SHRT_MA| |00000b10| 58 2e 0d 09 09 09 48 6f | 77 65 76 65 72 2c 20 70 |X.....Ho|wever, p| |00000b20| 65 72 66 6f 72 6d 61 6e | 63 65 20 69 73 20 73 6c |erforman|ce is sl| |00000b30| 6f 77 2c 20 73 69 6e 63 | 65 20 43 6f 70 79 42 69 |ow, sinc|e CopyBi| |00000b40| 74 73 51 75 69 63 6b 6c | 79 2e 63 20 64 6f 65 73 |tsQuickl|y.c does| |00000b50| 6e 27 74 20 67 65 6e 65 | 72 61 74 65 0d 09 09 09 |n't gene|rate....| |00000b60| 68 61 6e 64 2d 74 75 6e | 65 64 20 61 73 73 65 6d |hand-tun|ed assem| |00000b70| 62 6c 79 20 63 6f 64 65 | 20 77 68 65 6e 20 75 73 |bly code| when us| |00000b80| 69 6e 67 20 4d 50 57 20 | 43 2e 0d 38 2f 36 2f 39 |ing MPW |C..8/6/9| |00000b90| 31 09 64 67 70 09 52 65 | 70 6c 61 63 65 64 20 72 |1.dgp.Re|placed r| |00000ba0| 61 6e 64 55 28 29 20 62 | 79 20 52 61 6e 64 46 69 |andU() b|y RandFi| |00000bb0| 6c 6c 28 29 2c 20 77 68 | 69 63 68 20 72 75 6e 73 |ll(), wh|ich runs| |00000bc0| 20 74 77 69 63 65 20 61 | 73 20 66 61 73 74 2e 0d | twice a|s fast..| |00000bd0| 38 2f 32 34 2f 39 31 09 | 64 67 70 09 4d 61 64 65 |8/24/91.|dgp.Made| |00000be0| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with| |00000bf0| 20 54 48 49 4e 4b 20 43 | 20 35 2e 30 2e 0d 37 2f | THINK C| 5.0..7/| |00000c00| 32 30 2f 39 32 09 64 67 | 70 09 74 69 64 69 65 64 |20/92.dg|p.tidied| |00000c10| 20 75 70 20 74 68 65 20 | 63 6f 6d 6d 65 6e 74 73 | up the |comments| |00000c20| 20 73 6c 69 67 68 74 6c | 79 2e 20 43 6f 6e 66 69 | slightl|y. Confi| |00000c30| 72 6d 65 64 20 63 6f 6d | 70 61 74 69 62 69 6c 69 |rmed com|patibili| |00000c40| 74 79 20 77 69 74 68 20 | 33 32 2d 62 69 74 0d 09 |ty with |32-bit..| |00000c50| 09 09 61 64 64 72 65 73 | 73 69 6e 67 2e 0d 38 2f |..addres|sing..8/| |00000c60| 32 37 2f 39 32 09 64 67 | 70 09 72 65 70 6c 61 63 |27/92.dg|p.replac| |00000c70| 65 20 53 79 73 45 6e 76 | 69 72 6f 6e 73 28 29 20 |e SysEnv|irons() | |00000c80| 62 79 20 47 65 73 74 61 | 6c 74 28 29 0d 31 2f 31 |by Gesta|lt().1/1| |00000c90| 33 2f 39 33 20 64 67 70 | 09 63 68 61 6e 67 65 64 |3/93 dgp|.changed| |00000ca0| 20 64 65 66 61 75 6c 74 | 73 20 74 6f 20 6d 61 78 | default|s to max| |00000cb0| 69 6d 69 7a 65 20 73 70 | 65 65 64 2e 0d 2a 2f 0d |imize sp|eed..*/.| |00000cc0| 23 69 6e 63 6c 75 64 65 | 20 22 56 69 64 65 6f 54 |#include| "VideoT| |00000cd0| 6f 6f 6c 62 6f 78 2e 68 | 22 0d 23 69 66 20 54 48 |oolbox.h|".#if TH| |00000ce0| 49 4e 4b 5f 43 0d 09 23 | 69 6e 63 6c 75 64 65 20 |INK_C..#|include | |00000cf0| 3c 4c 6f 4d 65 6d 2e 68 | 3e 09 09 2f 2f 20 4d 42 |<LoMem.h|>..// MB| |00000d00| 61 72 48 65 69 67 68 74 | 0d 23 65 6c 73 65 0d 09 |arHeight|.#else..| |00000d10| 73 68 6f 72 74 20 4d 42 | 61 72 48 65 69 67 68 74 |short MB|arHeight| |00000d20| 20 3a 20 30 78 42 41 41 | 3b 0d 23 65 6e 64 69 66 | : 0xBAA|;.#endif| |00000d30| 0d 76 6f 69 64 20 6d 61 | 69 6e 28 76 6f 69 64 29 |.void ma|in(void)| |00000d40| 3b 0d 42 6f 6f 6c 65 61 | 6e 20 5a 6f 6f 6d 65 64 |;.Boolea|n Zoomed| |00000d50| 4f 75 74 28 57 69 6e 64 | 6f 77 50 74 72 20 77 29 |Out(Wind|owPtr w)| |00000d60| 3b 0d 23 64 65 66 69 6e | 65 20 52 41 49 53 45 5f |;.#defin|e RAISE_| |00000d70| 50 52 49 4f 52 49 54 59 | 09 31 09 2f 2a 20 4f 70 |PRIORITY|.1./* Op| |00000d80| 74 69 6f 6e 61 6c 2e 20 | 43 6f 6e 74 72 61 72 79 |tional. |Contrary| |00000d90| 20 74 6f 20 41 70 70 6c | 65 27 73 20 72 75 6c 65 | to Appl|e's rule| |00000da0| 73 2c 09 2a 2f 0d 09 09 | 09 09 09 09 09 2f 2a 20 |s,.*/...|...../* | |00000db0| 62 75 74 20 73 70 65 65 | 64 73 20 75 70 20 74 68 |but spee|ds up th| |00000dc0| 65 20 64 69 73 70 6c 61 | 79 2e 20 2a 2f 0d 23 64 |e displa|y. */.#d| |00000dd0| 65 66 69 6e 65 20 53 43 | 52 4f 4c 4c 5f 42 41 52 |efine SC|ROLL_BAR| |00000de0| 20 31 35 09 09 2f 2a 20 | 53 74 61 6e 64 61 72 64 | 15../* |Standard| |00000df0| 20 77 69 64 74 68 20 6f | 66 20 73 63 72 6f 6c 6c | width o|f scroll| |00000e00| 20 62 61 72 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 | bar */.|#define | |00000e10| 57 41 49 54 5f 4e 45 58 | 54 5f 45 56 45 4e 54 20 |WAIT_NEX|T_EVENT | |00000e20| 30 0d 0d 45 76 65 6e 74 | 52 65 63 6f 72 64 20 74 |0..Event|Record t| |00000e30| 68 65 45 76 65 6e 74 3b | 09 2f 2a 20 67 6c 6f 62 |heEvent;|./* glob| |00000e40| 61 6c 20 2a 2f 0d 0d 76 | 6f 69 64 20 53 61 6e 64 |al */..v|oid Sand| |00000e50| 73 74 6f 72 6d 28 76 6f | 69 64 29 3b 0d 0d 76 6f |storm(vo|id);..vo| |00000e60| 69 64 20 6d 61 69 6e 28 | 76 6f 69 64 29 0d 7b 0d |id main(|void).{.| |00000e70| 09 52 65 71 75 69 72 65 | 28 67 65 73 74 61 6c 74 |.Require|(gestalt| |00000e80| 38 42 69 74 51 44 29 3b | 0d 09 53 61 6e 64 73 74 |8BitQD);|..Sandst| |00000e90| 6f 72 6d 28 29 3b 0d 7d | 0d 76 6f 69 64 20 53 61 |orm();.}|.void Sa| |00000ea0| 6e 64 73 74 6f 72 6d 28 | 29 0d 7b 0d 09 72 65 67 |ndstorm(|).{..reg| |00000eb0| 69 73 74 65 72 20 73 69 | 7a 65 5f 74 20 75 69 3b |ister si|ze_t ui;| |00000ec0| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short| |00000ed0| 20 2a 62 75 66 66 65 72 | 50 74 72 3b 0d 09 69 6e | *buffer|Ptr;..in| |00000ee0| 74 20 69 3b 0d 09 73 74 | 61 74 69 63 20 63 68 61 |t i;..st|atic cha| |00000ef0| 72 20 73 74 72 69 6e 67 | 5b 34 30 5d 3b 0d 09 73 |r string|[40];..s| |00000f00| 74 61 74 69 63 20 50 69 | 78 4d 61 70 20 73 61 6e |tatic Pi|xMap san| |00000f10| 64 3b 0d 09 52 65 63 74 | 20 72 2c 75 6e 7a 6f 6f |d;..Rect| r,unzoo| |00000f20| 6d 65 64 52 65 63 74 2c | 67 64 52 65 63 74 3b 0d |medRect,|gdRect;.| |00000f30| 09 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |.GDHandl|e device| |00000f40| 3b 0d 09 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |;..Windo|wPtr win| |00000f50| 64 6f 77 2c 61 57 69 6e | 64 6f 77 2c 6f 6c 64 50 |dow,aWin|dow,oldP| |00000f60| 6f 72 74 3b 0d 09 50 69 | 78 4d 61 70 20 2a 2a 6d |ort;..Pi|xMap **m| |00000f70| 79 50 69 78 4d 61 70 48 | 61 6e 64 6c 65 3b 0d 09 |yPixMapH|andle;..| |00000f80| 73 74 61 74 69 63 20 42 | 69 74 4d 61 70 20 62 75 |static B|itMap bu| |00000f90| 66 66 65 72 3b 0d 09 6c | 6f 6e 67 20 62 75 66 66 |ffer;..l|ong buff| |00000fa0| 65 72 42 79 74 65 73 3b | 0d 09 73 69 7a 65 5f 74 |erBytes;|..size_t| |00000fb0| 20 73 61 6e 64 42 79 74 | 65 73 3b 0d 09 42 6f 6f | sandByt|es;..Boo| |00000fc0| 6c 65 61 6e 20 64 6f 6e | 65 3d 30 2c 75 70 64 61 |lean don|e=0,upda| |00000fd0| 74 65 3b 0d 09 6c 6f 6e | 67 20 72 65 53 69 7a 65 |te;..lon|g reSize| |00000fe0| 3b 0d 09 69 6e 74 20 77 | 69 6e 64 6f 77 45 76 65 |;..int w|indowEve| |00000ff0| 6e 74 3d 69 6e 44 65 73 | 6b 3b 0d 09 69 6e 74 20 |nt=inDes|k;..int | |00001000| 65 72 72 6f 72 3b 0d 09 | 42 6f 6f 6c 65 61 6e 20 |error;..|Boolean | |00001010| 7a 6f 6f 6d 65 64 4f 75 | 74 3b 0d 09 57 53 74 61 |zoomedOu|t;..WSta| |00001020| 74 65 44 61 74 61 20 2a | 77 53 74 61 74 65 44 61 |teData *|wStateDa| |00001030| 74 61 3b 0d 09 52 67 6e | 48 61 6e 64 6c 65 20 69 |ta;..Rgn|Handle i| |00001040| 67 6e 6f 72 65 52 67 6e | 3b 0d 09 69 6e 74 20 70 |gnoreRgn|;..int p| |00001050| 69 78 65 6c 53 69 7a 65 | 3b 0d 09 6c 6f 6e 67 20 |ixelSize|;..long | |00001060| 76 61 6c 75 65 3b 0d 09 | 0d 09 2f 2a 20 49 4e 49 |value;..|../* INI| |00001070| 54 49 41 4c 49 5a 45 20 | 51 75 69 63 6b 44 72 61 |TIALIZE |QuickDra| |00001080| 77 20 2a 2f 0d 09 4d 61 | 78 41 70 70 6c 5a 6f 6e |w */..Ma|xApplZon| |00001090| 65 28 29 3b 09 09 09 09 | 09 09 2f 2a 20 45 78 70 |e();....|../* Exp| |000010a0| 61 6e 64 20 68 65 61 70 | 20 74 6f 20 74 68 65 20 |and heap| to the | |000010b0| 6c 69 6d 69 74 2e 20 2a | 2f 0d 09 49 6e 69 74 47 |limit. *|/..InitG| |000010c0| 72 61 66 28 26 71 64 2e | 74 68 65 50 6f 72 74 29 |raf(&qd.|thePort)| |000010d0| 3b 0d 09 49 6e 69 74 46 | 6f 6e 74 73 28 29 3b 0d |;..InitF|onts();.| |000010e0| 09 49 6e 69 74 57 69 6e | 64 6f 77 73 28 29 3b 0d |.InitWin|dows();.| |000010f0| 09 49 6e 69 74 43 75 72 | 73 6f 72 28 29 3b 0d 09 |.InitCur|sor();..| |00001100| 47 65 74 50 6f 72 74 28 | 26 6f 6c 64 50 6f 72 74 |GetPort(|&oldPort| |00001110| 29 3b 0d 09 64 65 76 69 | 63 65 3d 47 65 74 4d 61 |);..devi|ce=GetMa| |00001120| 69 6e 44 65 76 69 63 65 | 28 29 3b 0d 0d 09 2f 2a |inDevice|();.../*| |00001130| 20 6f 70 65 6e 20 61 20 | 77 69 6e 64 6f 77 20 6f | open a |window o| |00001140| 6e 20 74 68 65 20 64 65 | 76 69 63 65 20 2a 2f 0d |n the de|vice */.| |00001150| 09 69 67 6e 6f 72 65 52 | 67 6e 3d 4e 65 77 52 67 |.ignoreR|gn=NewRg| |00001160| 6e 28 29 3b 0d 09 53 65 | 74 52 65 63 74 28 26 72 |n();..Se|tRect(&r| |00001170| 2c 30 2c 30 2c 31 39 32 | 2b 53 43 52 4f 4c 4c 5f |,0,0,192|+SCROLL_| |00001180| 42 41 52 2c 31 39 32 2b | 53 43 52 4f 4c 4c 5f 42 |BAR,192+|SCROLL_B| |00001190| 41 52 29 3b 0d 09 43 65 | 6e 74 65 72 52 65 63 74 |AR);..Ce|nterRect| |000011a0| 49 6e 52 65 63 74 28 26 | 72 2c 26 28 2a 64 65 76 |InRect(&|r,&(*dev| |000011b0| 69 63 65 29 2d 3e 67 64 | 52 65 63 74 29 3b 0d 09 |ice)->gd|Rect);..| |000011c0| 77 69 6e 64 6f 77 3d 4e | 65 77 43 57 69 6e 64 6f |window=N|ewCWindo| |000011d0| 77 28 4e 55 4c 4c 0d 09 | 09 2c 26 72 2c 43 74 6f |w(NULL..|.,&r,Cto| |000011e0| 50 73 74 72 28 22 4e 6f | 77 20 63 6f 6d 70 75 74 |Pstr("No|w comput| |000011f0| 69 6e 67 20 6e 6f 69 73 | 65 20 2e 2e 2e 22 29 2c |ing nois|e ..."),| |00001200| 54 52 55 45 2c 7a 6f 6f | 6d 44 6f 63 50 72 6f 63 |TRUE,zoo|mDocProc| |00001210| 2c 28 57 69 6e 64 6f 77 | 50 74 72 29 20 2d 31 4c |,(Window|Ptr) -1L| |00001220| 2c 54 52 55 45 2c 30 4c | 29 3b 0d 09 6d 79 50 69 |,TRUE,0L|);..myPi| |00001230| 78 4d 61 70 48 61 6e 64 | 6c 65 20 3d 20 28 28 43 |xMapHand|le = ((C| |00001240| 47 72 61 66 50 74 72 29 | 77 69 6e 64 6f 77 29 2d |GrafPtr)|window)-| |00001250| 3e 70 6f 72 74 50 69 78 | 4d 61 70 3b 0d 09 4d 6f |>portPix|Map;..Mo| |00001260| 76 65 48 48 69 28 28 48 | 61 6e 64 6c 65 29 20 6d |veHHi((H|andle) m| |00001270| 79 50 69 78 4d 61 70 48 | 61 6e 64 6c 65 29 3b 0d |yPixMapH|andle);.| |00001280| 09 48 4c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 20 |.HLock((|Handle) | |00001290| 6d 79 50 69 78 4d 61 70 | 48 61 6e 64 6c 65 29 3b |myPixMap|Handle);| |000012a0| 0d 0d 09 2f 2a 20 43 6f | 6d 70 75 74 65 20 6e 6f |.../* Co|mpute no| |000012b0| 69 73 65 20 2a 2f 0d 09 | 2f 2a 20 61 6c 6c 6f 63 |ise */..|/* alloc| |000012c0| 61 74 65 20 62 75 66 66 | 65 72 20 42 69 74 4d 61 |ate buff|er BitMa| |000012d0| 70 20 2a 2f 0d 09 62 75 | 66 66 65 72 2e 72 6f 77 |p */..bu|ffer.row| |000012e0| 42 79 74 65 73 3d 31 30 | 32 34 3b 0d 09 4d 61 78 |Bytes=10|24;..Max| |000012f0| 41 70 70 6c 5a 6f 6e 65 | 28 29 3b 0d 09 62 75 66 |ApplZone|();..buf| |00001300| 66 65 72 42 79 74 65 73 | 20 3d 20 46 72 65 65 4d |ferBytes| = FreeM| |00001310| 65 6d 28 29 3b 0d 09 62 | 75 66 66 65 72 42 79 74 |em();..b|ufferByt| |00001320| 65 73 2d 3d 31 30 30 30 | 30 30 4c 3b 09 2f 2a 20 |es-=1000|00L;./* | |00001330| 47 72 61 62 20 6d 6f 73 | 74 20 6f 66 20 61 76 61 |Grab mos|t of ava| |00001340| 69 6c 61 62 6c 65 20 73 | 70 61 63 65 2e 20 2a 2f |ilable s|pace. */| |00001350| 0d 09 62 75 66 66 65 72 | 42 79 74 65 73 20 2d 3d |..buffer|Bytes -=| |00001360| 20 62 75 66 66 65 72 42 | 79 74 65 73 25 62 75 66 | bufferB|ytes%buf| |00001370| 66 65 72 2e 72 6f 77 42 | 79 74 65 73 3b 0d 09 62 |fer.rowB|ytes;..b| |00001380| 75 66 66 65 72 2e 62 61 | 73 65 41 64 64 72 3d 4e |uffer.ba|seAddr=N| |00001390| 55 4c 4c 3b 0d 09 66 6f | 72 28 3b 62 75 66 66 65 |ULL;..fo|r(;buffe| |000013a0| 72 42 79 74 65 73 3e 30 | 3b 62 75 66 66 65 72 42 |rBytes>0|;bufferB| |000013b0| 79 74 65 73 20 2d 3d 20 | 62 75 66 66 65 72 2e 72 |ytes -= |buffer.r| |000013c0| 6f 77 42 79 74 65 73 29 | 7b 0d 09 09 62 75 66 66 |owBytes)|{...buff| |000013d0| 65 72 2e 62 61 73 65 41 | 64 64 72 20 3d 20 4e 65 |er.baseA|ddr = Ne| |000013e0| 77 50 74 72 28 62 75 66 | 66 65 72 42 79 74 65 73 |wPtr(buf|ferBytes| |000013f0| 29 3b 0d 09 09 69 66 20 | 28 62 75 66 66 65 72 2e |);...if |(buffer.| |00001400| 62 61 73 65 41 64 64 72 | 21 3d 4e 55 4c 4c 29 62 |baseAddr|!=NULL)b| |00001410| 72 65 61 6b 3b 0d 09 7d | 0d 09 69 66 28 62 75 66 |reak;..}|..if(buf| |00001420| 66 65 72 2e 62 61 73 65 | 41 64 64 72 3d 3d 4e 55 |fer.base|Addr==NU| |00001430| 4c 4c 29 50 72 69 6e 74 | 66 45 78 69 74 28 22 5c |LL)Print|fExit("\| |00001440| 30 30 37 53 6f 72 72 79 | 2c 20 6e 6f 74 20 65 6e |007Sorry|, not en| |00001450| 6f 75 67 68 20 6d 65 6d | 6f 72 79 20 66 6f 72 20 |ough mem|ory for | |00001460| 62 75 66 66 65 72 73 2e | 5c 6e 22 29 3b 0d 09 53 |buffers.|\n");..S| |00001470| 65 74 52 65 63 74 28 26 | 62 75 66 66 65 72 2e 62 |etRect(&|buffer.b| |00001480| 6f 75 6e 64 73 2c 30 2c | 30 2c 62 75 66 66 65 72 |ounds,0,|0,buffer| |00001490| 2e 72 6f 77 42 79 74 65 | 73 2a 38 4c 2c 62 75 66 |.rowByte|s*8L,buf| |000014a0| 66 65 72 42 79 74 65 73 | 2f 62 75 66 66 65 72 2e |ferBytes|/buffer.| |000014b0| 72 6f 77 42 79 74 65 73 | 29 3b 0d 0d 09 2f 2a 20 |rowBytes|);.../* | |000014c0| 46 69 6c 6c 20 62 75 66 | 66 65 72 20 77 69 74 68 |Fill buf|fer with| |000014d0| 20 6e 6f 69 73 65 2e 20 | 2a 2f 0d 09 62 75 66 66 | noise. |*/..buff| |000014e0| 65 72 50 74 72 20 3d 20 | 28 73 68 6f 72 74 20 2a |erPtr = |(short *| |000014f0| 29 20 62 75 66 66 65 72 | 2e 62 61 73 65 41 64 64 |) buffer|.baseAdd| |00001500| 72 3b 0d 09 52 61 6e 64 | 46 69 6c 6c 28 62 75 66 |r;..Rand|Fill(buf| |00001510| 66 65 72 2e 62 61 73 65 | 41 64 64 72 2c 62 75 66 |fer.base|Addr,buf| |00001520| 66 65 72 42 79 74 65 73 | 29 3b 0d 0d 09 2f 2a 20 |ferBytes|);.../* | |00001530| 53 68 6f 77 20 6e 6f 69 | 73 65 20 2a 2f 0d 09 53 |Show noi|se */..S| |00001540| 65 74 50 6f 72 74 28 77 | 69 6e 64 6f 77 29 3b 0d |etPort(w|indow);.| |00001550| 09 72 65 53 69 7a 65 3d | 30 3b 0d 09 77 68 69 6c |.reSize=|0;..whil| |00001560| 65 20 28 31 29 20 7b 0d | 09 09 77 53 74 61 74 65 |e (1) {.|..wState| |00001570| 44 61 74 61 3d 28 2a 28 | 28 57 53 74 61 74 65 44 |Data=(*(|(WStateD| |00001580| 61 74 61 20 2a 2a 29 28 | 28 57 69 6e 64 6f 77 50 |ata **)(|(WindowP| |00001590| 65 65 6b 29 77 69 6e 64 | 6f 77 29 2d 3e 64 61 74 |eek)wind|ow)->dat| |000015a0| 61 48 61 6e 64 6c 65 29 | 29 3b 0d 09 09 75 6e 7a |aHandle)|);...unz| |000015b0| 6f 6f 6d 65 64 52 65 63 | 74 3d 77 53 74 61 74 65 |oomedRec|t=wState| |000015c0| 44 61 74 61 2d 3e 75 73 | 65 72 53 74 61 74 65 3b |Data->us|erState;| |000015d0| 0d 09 09 7a 6f 6f 6d 65 | 64 4f 75 74 3d 5a 6f 6f |...zoome|dOut=Zoo| |000015e0| 6d 65 64 4f 75 74 28 77 | 69 6e 64 6f 77 29 3b 0d |medOut(w|indow);.| |000015f0| 09 09 69 66 28 72 65 53 | 69 7a 65 29 7b 0d 09 09 |..if(reS|ize){...| |00001600| 09 53 69 7a 65 57 69 6e | 64 6f 77 28 77 69 6e 64 |.SizeWin|dow(wind| |00001610| 6f 77 2c 4c 6f 57 6f 72 | 64 28 72 65 53 69 7a 65 |ow,LoWor|d(reSize| |00001620| 29 2c 48 69 57 6f 72 64 | 28 72 65 53 69 7a 65 29 |),HiWord|(reSize)| |00001630| 2c 54 52 55 45 29 3b 0d | 09 09 09 72 65 53 69 7a |,TRUE);.|...reSiz| |00001640| 65 3d 30 4c 3b 0d 09 09 | 7d 0d 09 09 64 65 76 69 |e=0L;...|}...devi| |00001650| 63 65 3d 47 65 74 57 69 | 6e 64 6f 77 44 65 76 69 |ce=GetWi|ndowDevi| |00001660| 63 65 28 77 69 6e 64 6f | 77 29 3b 0d 09 09 69 66 |ce(windo|w);...if| |00001670| 28 64 65 76 69 63 65 3d | 3d 4e 55 4c 4c 29 7b 0d |(device=|=NULL){.| |00001680| 09 09 09 64 6f 6e 65 3d | 31 3b 0d 09 09 09 62 72 |...done=|1;....br| |00001690| 65 61 6b 3b 0d 09 09 7d | 0d 09 09 72 3d 77 69 6e |eak;...}|...r=win| |000016a0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 3b 0d 09 |dow->por|tRect;..| |000016b0| 09 4c 6f 63 61 6c 54 6f | 47 6c 6f 62 61 6c 52 65 |.LocalTo|GlobalRe| |000016c0| 63 74 28 26 72 29 3b 0d | 09 09 67 64 52 65 63 74 |ct(&r);.|..gdRect| |000016d0| 3d 28 2a 64 65 76 69 63 | 65 29 2d 3e 67 64 52 65 |=(*devic|e)->gdRe| |000016e0| 63 74 3b 0d 09 09 2f 2a | 20 6c 65 61 76 65 20 72 |ct;.../*| leave r| |000016f0| 6f 6f 6d 20 66 6f 72 20 | 77 69 6e 64 6f 77 27 73 |oom for |window's| |00001700| 20 74 69 74 6c 65 20 62 | 61 72 20 2a 2f 0d 09 09 | title b|ar */...| |00001710| 67 64 52 65 63 74 2e 74 | 6f 70 2b 3d 72 2e 74 6f |gdRect.t|op+=r.to| |00001720| 70 2d 31 2d 28 2a 28 28 | 57 69 6e 64 6f 77 50 65 |p-1-(*((|WindowPe| |00001730| 65 6b 29 77 69 6e 64 6f | 77 29 2d 3e 73 74 72 75 |ek)windo|w)->stru| |00001740| 63 52 67 6e 29 2d 3e 72 | 67 6e 42 42 6f 78 2e 74 |cRgn)->r|gnBBox.t| |00001750| 6f 70 3b 0d 09 09 2f 2a | 20 6c 65 61 76 65 20 72 |op;.../*| leave r| |00001760| 6f 6f 6d 20 66 6f 72 20 | 6d 65 6e 75 20 62 61 72 |oom for |menu bar| |00001770| 20 2a 2f 0d 09 09 69 66 | 28 64 65 76 69 63 65 3d | */...if|(device=| |00001780| 3d 47 65 74 4d 61 69 6e | 44 65 76 69 63 65 28 29 |=GetMain|Device()| |00001790| 29 67 64 52 65 63 74 2e | 74 6f 70 2b 3d 4d 42 61 |)gdRect.|top+=MBa| |000017a0| 72 48 65 69 67 68 74 3b | 0d 09 09 53 65 63 74 52 |rHeight;|...SectR| |000017b0| 65 63 74 28 26 67 64 52 | 65 63 74 2c 26 72 2c 26 |ect(&gdR|ect,&r,&| |000017c0| 72 29 3b 0d 09 09 70 69 | 78 65 6c 53 69 7a 65 3d |r);...pi|xelSize=| |000017d0| 28 2a 2a 28 2a 2a 64 65 | 76 69 63 65 29 2e 67 64 |(**(**de|vice).gd| |000017e0| 50 4d 61 70 29 2e 70 69 | 78 65 6c 53 69 7a 65 3b |PMap).pi|xelSize;| |000017f0| 0d 09 09 69 3d 72 2e 6c | 65 66 74 2d 28 2a 64 65 |...i=r.l|eft-(*de| |00001800| 76 69 63 65 29 2d 3e 67 | 64 52 65 63 74 2e 6c 65 |vice)->g|dRect.le| |00001810| 66 74 3b 0d 09 09 69 3d | 28 69 2a 70 69 78 65 6c |ft;...i=|(i*pixel| |00001820| 53 69 7a 65 2b 31 36 20 | 26 20 7e 33 31 29 2f 70 |Size+16 |& ~31)/p| |00001830| 69 78 65 6c 53 69 7a 65 | 2d 69 3b 09 2f 2a 20 6d |ixelSize|-i;./* m| |00001840| 6f 76 65 20 74 6f 20 6e | 65 61 72 65 73 74 20 33 |ove to n|earest 3| |00001850| 32 2d 62 69 74 20 62 6f | 75 6e 64 61 72 79 20 2a |2-bit bo|undary *| |00001860| 2f 0d 09 09 4f 66 66 73 | 65 74 52 65 63 74 28 26 |/...Offs|etRect(&| |00001870| 72 2c 69 2c 30 29 3b 09 | 09 09 09 09 09 2f 2a 20 |r,i,0);.|...../* | |00001880| 41 73 73 75 6d 65 73 20 | 77 69 6e 64 6f 77 20 69 |Assumes |window i| |00001890| 73 20 3e 31 36 20 62 69 | 74 73 20 77 69 64 65 20 |s >16 bi|ts wide | |000018a0| 2a 2f 0d 09 09 53 65 63 | 74 52 65 63 74 28 26 67 |*/...Sec|tRect(&g| |000018b0| 64 52 65 63 74 2c 26 72 | 2c 26 72 29 3b 0d 09 09 |dRect,&r|,&r);...| |000018c0| 4d 6f 76 65 57 69 6e 64 | 6f 77 28 77 69 6e 64 6f |MoveWind|ow(windo| |000018d0| 77 2c 72 2e 6c 65 66 74 | 2c 72 2e 74 6f 70 2c 54 |w,r.left|,r.top,T| |000018e0| 52 55 45 29 3b 0d 09 09 | 4f 66 66 73 65 74 52 65 |RUE);...|OffsetRe| |000018f0| 63 74 28 26 72 2c 2d 72 | 2e 6c 65 66 74 2c 2d 72 |ct(&r,-r|.left,-r| |00001900| 2e 74 6f 70 29 3b 0d 09 | 09 73 61 6e 64 20 3d 20 |.top);..|.sand = | |00001910| 2a 2a 28 2a 64 65 76 69 | 63 65 29 2d 3e 67 64 50 |**(*devi|ce)->gdP| |00001920| 4d 61 70 3b 09 2f 2a 20 | 49 6e 69 74 69 61 6c 69 |Map;./* |Initiali| |00001930| 7a 65 20 50 69 78 4d 61 | 70 20 66 69 65 6c 64 73 |ze PixMa|p fields| |00001940| 20 66 72 6f 6d 20 73 63 | 72 65 65 6e 20 2a 2f 0d | from sc|reen */.| |00001950| 09 09 73 61 6e 64 2e 62 | 6f 75 6e 64 73 3d 72 3b |..sand.b|ounds=r;| |00001960| 0d 09 09 73 61 6e 64 2e | 62 6f 75 6e 64 73 2e 72 |...sand.|bounds.r| |00001970| 69 67 68 74 20 20 2d 3d | 53 43 52 4f 4c 4c 5f 42 |ight -=|SCROLL_B| |00001980| 41 52 3b 09 2f 2a 20 4c | 65 61 76 65 20 72 6f 6f |AR;./* L|eave roo| |00001990| 6d 20 66 6f 72 20 74 68 | 65 20 73 63 72 6f 6c 6c |m for th|e scroll| |000019a0| 20 62 61 72 73 20 2a 2f | 0d 09 09 73 61 6e 64 2e | bars */|...sand.| |000019b0| 62 6f 75 6e 64 73 2e 62 | 6f 74 74 6f 6d 20 2d 3d |bounds.b|ottom -=| |000019c0| 53 43 52 4f 4c 4c 5f 42 | 41 52 3b 0d 09 09 73 61 |SCROLL_B|AR;...sa| |000019d0| 6e 64 2e 62 6f 75 6e 64 | 73 2e 72 69 67 68 74 3d |nd.bound|s.right=| |000019e0| 28 73 61 6e 64 2e 62 6f | 75 6e 64 73 2e 72 69 67 |(sand.bo|unds.rig| |000019f0| 68 74 2a 73 61 6e 64 2e | 70 69 78 65 6c 53 69 7a |ht*sand.|pixelSiz| |00001a00| 65 2b 31 34 20 26 20 7e | 33 31 29 2f 73 61 6e 64 |e+14 & ~|31)/sand| |00001a10| 2e 70 69 78 65 6c 53 69 | 7a 65 3b 0d 09 09 09 2f |.pixelSi|ze;..../| |00001a20| 2a 20 72 6f 75 6e 64 20 | 74 6f 20 6d 75 6c 74 69 |* round |to multi| |00001a30| 70 6c 65 20 6f 66 20 33 | 32 20 62 69 74 73 20 2a |ple of 3|2 bits *| |00001a40| 2f 0d 09 09 69 66 28 73 | 61 6e 64 2e 62 6f 75 6e |/...if(s|and.boun| |00001a50| 64 73 2e 72 69 67 68 74 | 3c 33 32 29 73 61 6e 64 |ds.right|<32)sand| |00001a60| 2e 62 6f 75 6e 64 73 2e | 72 69 67 68 74 3d 33 32 |.bounds.|right=32| |00001a70| 3b 0d 09 09 73 61 6e 64 | 2e 72 6f 77 42 79 74 65 |;...sand|.rowByte| |00001a80| 73 20 3d 20 28 73 61 6e | 64 2e 62 6f 75 6e 64 73 |s = (san|d.bounds| |00001a90| 2e 72 69 67 68 74 2a 73 | 61 6e 64 2e 70 69 78 65 |.right*s|and.pixe| |00001aa0| 6c 53 69 7a 65 20 2b 20 | 33 31 20 26 20 7e 33 31 |lSize + |31 & ~31| |00001ab0| 29 2f 38 3b 0d 09 09 09 | 2f 2a 20 72 6f 75 6e 64 |)/8;....|/* round| |00001ac0| 20 75 70 20 74 6f 20 6d | 75 6c 74 69 70 6c 65 20 | up to m|ultiple | |00001ad0| 6f 66 20 33 32 20 62 69 | 74 73 20 28 72 65 64 75 |of 32 bi|ts (redu| |00001ae0| 6e 64 61 6e 74 29 20 2a | 2f 0d 09 09 73 61 6e 64 |ndant) *|/...sand| |00001af0| 42 79 74 65 73 20 3d 20 | 28 73 69 7a 65 5f 74 29 |Bytes = |(size_t)| |00001b00| 20 73 61 6e 64 2e 72 6f | 77 42 79 74 65 73 20 2a | sand.ro|wBytes *| |00001b10| 20 28 73 69 7a 65 5f 74 | 29 20 73 61 6e 64 2e 62 | (size_t|) sand.b| |00001b20| 6f 75 6e 64 73 2e 62 6f | 74 74 6f 6d 3b 0d 09 09 |ounds.bo|ttom;...| |00001b30| 69 66 28 62 75 66 66 65 | 72 42 79 74 65 73 2f 32 |if(buffe|rBytes/2| |00001b40| 20 3c 20 73 61 6e 64 42 | 79 74 65 73 29 0d 09 09 | < sandB|ytes)...| |00001b50| 7b 0d 09 09 09 2f 2a 20 | 72 65 73 74 72 69 63 74 |{..../* |restrict| |00001b60| 20 68 65 69 67 68 74 20 | 62 79 20 61 6d 6f 75 6e | height |by amoun| |00001b70| 74 20 6f 66 20 6e 6f 69 | 73 65 20 61 76 61 69 6c |t of noi|se avail| |00001b80| 61 62 6c 65 20 2a 2f 0d | 09 09 09 73 61 6e 64 2e |able */.|...sand.| |00001b90| 62 6f 75 6e 64 73 2e 62 | 6f 74 74 6f 6d 3d 62 75 |bounds.b|ottom=bu| |00001ba0| 66 66 65 72 42 79 74 65 | 73 2f 73 61 6e 64 2e 72 |fferByte|s/sand.r| |00001bb0| 6f 77 42 79 74 65 73 2f | 32 3b 0d 09 09 09 73 61 |owBytes/|2;....sa| |00001bc0| 6e 64 42 79 74 65 73 20 | 3d 20 28 73 69 7a 65 5f |ndBytes |= (size_| |00001bd0| 74 29 20 73 61 6e 64 2e | 72 6f 77 42 79 74 65 73 |t) sand.|rowBytes| |00001be0| 20 2a 20 28 73 69 7a 65 | 5f 74 29 20 73 61 6e 64 | * (size|_t) sand| |00001bf0| 2e 62 6f 75 6e 64 73 2e | 62 6f 74 74 6f 6d 3b 0d |.bounds.|bottom;.| |00001c00| 09 09 7d 09 0d 09 09 73 | 61 6e 64 2e 72 6f 77 42 |..}....s|and.rowB| |00001c10| 79 74 65 73 20 7c 3d 20 | 30 78 38 30 30 30 3b 09 |ytes |= |0x8000;.| |00001c20| 2f 2a 20 4d 61 72 6b 20 | 69 74 20 61 73 20 61 20 |/* Mark |it as a | |00001c30| 50 69 78 4d 61 70 20 2a | 2f 0d 09 09 73 61 6e 64 |PixMap *|/...sand| |00001c40| 2e 70 6d 56 65 72 73 69 | 6f 6e 3d 30 3b 0d 09 09 |.pmVersi|on=0;...| |00001c50| 73 61 6e 64 2e 70 61 63 | 6b 54 79 70 65 3d 30 3b |sand.pac|kType=0;| |00001c60| 0d 09 09 73 61 6e 64 2e | 70 61 63 6b 53 69 7a 65 |...sand.|packSize| |00001c70| 3d 30 3b 0d 09 09 73 61 | 6e 64 2e 70 6c 61 6e 65 |=0;...sa|nd.plane| |00001c80| 42 79 74 65 73 3d 30 3b | 0d 09 09 73 61 6e 64 2e |Bytes=0;|...sand.| |00001c90| 70 6d 52 65 73 65 72 76 | 65 64 3d 30 3b 0d 09 09 |pmReserv|ed=0;...| |00001ca0| 53 69 7a 65 57 69 6e 64 | 6f 77 28 77 69 6e 64 6f |SizeWind|ow(windo| |00001cb0| 77 0d 09 09 09 2c 73 61 | 6e 64 2e 62 6f 75 6e 64 |w....,sa|nd.bound| |00001cc0| 73 2e 72 69 67 68 74 2b | 53 43 52 4f 4c 4c 5f 42 |s.right+|SCROLL_B| |00001cd0| 41 52 2c 73 61 6e 64 2e | 62 6f 75 6e 64 73 2e 62 |AR,sand.|bounds.b| |00001ce0| 6f 74 74 6f 6d 2b 53 43 | 52 4f 4c 4c 5f 42 41 52 |ottom+SC|ROLL_BAR| |00001cf0| 2c 54 52 55 45 29 3b 0d | 09 09 45 72 61 73 65 52 |,TRUE);.|..EraseR| |00001d00| 65 63 74 28 26 77 69 6e | 64 6f 77 2d 3e 70 6f 72 |ect(&win|dow->por| |00001d10| 74 52 65 63 74 29 3b 0d | 09 09 44 72 61 77 47 72 |tRect);.|..DrawGr| |00001d20| 6f 77 49 63 6f 6e 28 77 | 69 6e 64 6f 77 29 3b 0d |owIcon(w|indow);.| |00001d30| 09 09 69 66 28 7a 6f 6f | 6d 65 64 4f 75 74 20 26 |..if(zoo|medOut &| |00001d40| 26 20 77 69 6e 64 6f 77 | 45 76 65 6e 74 21 3d 69 |& window|Event!=i| |00001d50| 6e 47 72 6f 77 20 26 26 | 20 77 69 6e 64 6f 77 45 |nGrow &&| windowE| |00001d60| 76 65 6e 74 21 3d 69 6e | 44 72 61 67 29 7b 0d 09 |vent!=in|Drag){..| |00001d70| 09 09 77 53 74 61 74 65 | 44 61 74 61 3d 28 2a 28 |..wState|Data=(*(| |00001d80| 28 57 53 74 61 74 65 44 | 61 74 61 20 2a 2a 29 28 |(WStateD|ata **)(| |00001d90| 28 57 69 6e 64 6f 77 50 | 65 65 6b 29 77 69 6e 64 |(WindowP|eek)wind| |00001da0| 6f 77 29 2d 3e 64 61 74 | 61 48 61 6e 64 6c 65 29 |ow)->dat|aHandle)| |00001db0| 29 3b 0d 09 09 09 72 3d | 77 69 6e 64 6f 77 2d 3e |);....r=|window->| |00001dc0| 70 6f 72 74 52 65 63 74 | 3b 0d 09 09 09 4c 6f 63 |portRect|;....Loc| |00001dd0| 61 6c 54 6f 47 6c 6f 62 | 61 6c 52 65 63 74 28 26 |alToGlob|alRect(&| |00001de0| 72 29 3b 0d 09 09 09 72 | 2e 6c 65 66 74 2d 3d 31 |r);....r|.left-=1| |00001df0| 3b 0d 09 09 09 72 2e 72 | 69 67 68 74 2d 3d 32 3b |;....r.r|ight-=2;| |00001e00| 0d 09 09 09 77 53 74 61 | 74 65 44 61 74 61 2d 3e |....wSta|teData->| |00001e10| 73 74 64 53 74 61 74 65 | 3d 72 3b 09 09 0d 09 09 |stdState|=r;.....| |00001e20| 09 77 53 74 61 74 65 44 | 61 74 61 2d 3e 75 73 65 |.wStateD|ata->use| |00001e30| 72 53 74 61 74 65 3d 75 | 6e 7a 6f 6f 6d 65 64 52 |rState=u|nzoomedR| |00001e40| 65 63 74 3b 0d 09 09 7d | 0d 09 09 73 70 72 69 6e |ect;...}|...sprin| |00001e50| 74 66 28 73 74 72 69 6e | 67 2c 22 25 64 78 25 64 |tf(strin|g,"%dx%d| |00001e60| 78 25 64 20 62 69 74 73 | 22 0d 09 09 09 2c 73 61 |x%d bits|"....,sa| |00001e70| 6e 64 2e 62 6f 75 6e 64 | 73 2e 72 69 67 68 74 2c |nd.bound|s.right,| |00001e80| 73 61 6e 64 2e 62 6f 75 | 6e 64 73 2e 62 6f 74 74 |sand.bou|nds.bott| |00001e90| 6f 6d 2c 73 61 6e 64 2e | 70 69 78 65 6c 53 69 7a |om,sand.|pixelSiz| |00001ea0| 65 29 3b 0d 09 09 53 65 | 74 57 54 69 74 6c 65 28 |e);...Se|tWTitle(| |00001eb0| 77 69 6e 64 6f 77 2c 43 | 74 6f 50 73 74 72 28 73 |window,C|toPstr(s| |00001ec0| 74 72 69 6e 67 29 29 3b | 0d 09 09 46 6c 75 73 68 |tring));|...Flush| |00001ed0| 45 76 65 6e 74 73 28 65 | 76 65 72 79 45 76 65 6e |Events(e|veryEven| |00001ee0| 74 2c 30 29 3b 0d 09 09 | 44 69 66 66 52 67 6e 28 |t,0);...|DiffRgn(| |00001ef0| 47 65 74 47 72 61 79 52 | 67 6e 28 29 2c 28 28 57 |GetGrayR|gn(),((W| |00001f00| 69 6e 64 6f 77 50 65 65 | 6b 29 77 69 6e 64 6f 77 |indowPee|k)window| |00001f10| 29 2d 3e 73 74 72 75 63 | 52 67 6e 2c 69 67 6e 6f |)->struc|Rgn,igno| |00001f20| 72 65 52 67 6e 29 3b 0d | 09 09 77 68 69 6c 65 20 |reRgn);.|..while | |00001f30| 28 31 29 20 7b 0d 09 09 | 09 75 70 64 61 74 65 3d |(1) {...|.update=| |00001f40| 30 3b 09 09 09 2f 2a 20 | 64 6f 6e 27 74 20 75 70 |0;.../* |don't up| |00001f50| 64 61 74 65 20 77 69 6e | 64 6f 77 20 66 72 61 6d |date win|dow fram| |00001f60| 65 20 75 6e 6c 65 73 73 | 20 6e 65 63 65 73 73 61 |e unless| necessa| |00001f70| 72 79 20 2a 2f 0d 09 09 | 09 23 69 66 20 52 41 49 |ry */...|.#if RAI| |00001f80| 53 45 5f 50 52 49 4f 52 | 49 54 59 0d 09 09 09 09 |SE_PRIOR|ITY.....| |00001f90| 53 65 74 50 72 69 6f 72 | 69 74 79 28 32 29 3b 09 |SetPrior|ity(2);.| |00001fa0| 2f 2a 20 47 65 74 20 6d | 6f 72 65 20 73 70 65 65 |/* Get m|ore spee| |00001fb0| 64 20 62 79 20 73 75 70 | 70 72 65 73 73 69 6e 67 |d by sup|pressing| |00001fc0| 20 6b 65 79 62 6f 61 72 | 64 2c 20 6d 6f 75 73 65 | keyboar|d, mouse| |00001fd0| 2c 20 61 6e 64 20 74 69 | 63 6b 73 2e 20 2a 2f 0d |, and ti|cks. */.| |00001fe0| 09 09 09 23 65 6e 64 69 | 66 0d 09 09 09 73 61 6e |...#endi|f....san| |00001ff0| 64 2e 62 61 73 65 41 64 | 64 72 20 3d 20 62 75 66 |d.baseAd|dr = buf| |00002000| 66 65 72 2e 62 61 73 65 | 41 64 64 72 3b 0d 09 09 |fer.base|Addr;...| |00002010| 09 2f 2a 20 63 68 6f 6f | 73 65 20 67 72 61 69 6e |./* choo|se grain| |00002020| 20 74 68 61 74 20 77 6f | 6e 27 74 20 6f 76 65 72 | that wo|n't over| |00002030| 66 6c 6f 77 20 73 68 6f | 72 74 20 61 72 67 75 6d |flow sho|rt argum| |00002040| 65 6e 74 20 74 6f 20 6e | 72 61 6e 64 28 29 20 2a |ent to n|rand() *| |00002050| 2f 0d 09 09 09 69 3d 28 | 62 75 66 66 65 72 42 79 |/....i=(|bufferBy| |00002060| 74 65 73 2f 53 48 52 54 | 5f 4d 41 58 2b 33 29 26 |tes/SHRT|_MAX+3)&| |00002070| 7e 33 3b 09 2f 2a 20 72 | 6f 75 6e 64 20 75 70 20 |~3;./* r|ound up | |00002080| 74 6f 20 6d 75 6c 74 69 | 70 6c 65 20 6f 66 20 34 |to multi|ple of 4| |00002090| 20 2a 2f 0d 09 09 09 73 | 61 6e 64 2e 62 61 73 65 | */....s|and.base| |000020a0| 41 64 64 72 20 2b 3d 20 | 6e 72 61 6e 64 28 28 62 |Addr += |nrand((b| |000020b0| 75 66 66 65 72 42 79 74 | 65 73 2d 73 61 6e 64 42 |ufferByt|es-sandB| |000020c0| 79 74 65 73 29 2f 69 29 | 2a 28 6c 6f 6e 67 29 69 |ytes)/i)|*(long)i| |000020d0| 3b 0d 09 09 09 69 66 28 | 28 28 57 69 6e 64 6f 77 |;....if(|((Window| |000020e0| 50 65 65 6b 29 77 69 6e | 64 6f 77 29 2d 3e 68 69 |Peek)win|dow)->hi| |000020f0| 6c 69 74 65 64 29 7b 0d | 09 09 09 09 43 6f 70 79 |lited){.|....Copy| |00002100| 42 69 74 73 51 75 69 63 | 6b 6c 79 28 28 42 69 74 |BitsQuic|kly((Bit| |00002110| 4d 61 70 20 2a 29 26 73 | 61 6e 64 2c 28 42 69 74 |Map *)&s|and,(Bit| |00002120| 4d 61 70 20 2a 29 2a 6d | 79 50 69 78 4d 61 70 48 |Map *)*m|yPixMapH| |00002130| 61 6e 64 6c 65 0d 09 09 | 09 09 09 2c 26 73 61 6e |andle...|...,&san| |00002140| 64 2e 62 6f 75 6e 64 73 | 2c 26 73 61 6e 64 2e 62 |d.bounds|,&sand.b| |00002150| 6f 75 6e 64 73 2c 73 72 | 63 43 6f 70 79 2c 4e 55 |ounds,sr|cCopy,NU| |00002160| 4c 4c 29 3b 0d 09 09 09 | 7d 0d 09 09 09 23 69 66 |LL);....|}....#if| |00002170| 20 52 41 49 53 45 5f 50 | 52 49 4f 52 49 54 59 0d | RAISE_P|RIORITY.| |00002180| 09 09 09 09 53 65 74 50 | 72 69 6f 72 69 74 79 28 |....SetP|riority(| |00002190| 30 29 3b 09 2f 2a 20 52 | 65 76 69 76 65 20 6b 65 |0);./* R|evive ke| |000021a0| 79 62 6f 61 72 64 20 61 | 6e 64 20 6d 6f 75 73 65 |yboard a|nd mouse| |000021b0| 2e 20 2a 2f 0d 09 09 09 | 23 65 6e 64 69 66 0d 09 |. */....|#endif..| |000021c0| 09 09 23 69 66 20 57 41 | 49 54 5f 4e 45 58 54 5f |..#if WA|IT_NEXT_| |000021d0| 45 56 45 4e 54 0d 20 20 | 20 09 09 09 69 66 28 57 |EVENT. | ...if(W| |000021e0| 61 69 74 4e 65 78 74 45 | 76 65 6e 74 28 6d 44 6f |aitNextE|vent(mDo| |000021f0| 77 6e 4d 61 73 6b 2b 6b | 65 79 44 6f 77 6e 4d 61 |wnMask+k|eyDownMa| |00002200| 73 6b 2c 26 74 68 65 45 | 76 65 6e 74 2c 30 2c 69 |sk,&theE|vent,0,i| |00002210| 67 6e 6f 72 65 52 67 6e | 29 29 7b 0d 20 20 20 09 |gnoreRgn|)){. .| |00002220| 09 09 23 65 6c 73 65 0d | 20 20 20 09 09 09 69 66 |..#else.| ...if| |00002230| 28 47 65 74 4e 65 78 74 | 45 76 65 6e 74 28 6d 44 |(GetNext|Event(mD| |00002240| 6f 77 6e 4d 61 73 6b 2b | 6b 65 79 44 6f 77 6e 4d |ownMask+|keyDownM| |00002250| 61 73 6b 2c 26 74 68 65 | 45 76 65 6e 74 29 29 7b |ask,&the|Event)){| |00002260| 0d 20 20 20 09 09 09 23 | 65 6e 64 69 66 0d 09 09 |. ...#|endif...| |00002270| 09 09 73 77 69 74 63 68 | 28 74 68 65 45 76 65 6e |..switch|(theEven| |00002280| 74 2e 77 68 61 74 29 7b | 0d 09 09 09 09 63 61 73 |t.what){|.....cas| |00002290| 65 20 6b 65 79 44 6f 77 | 6e 3a 0d 09 09 09 09 09 |e keyDow|n:......| |000022a0| 69 66 28 74 68 65 45 76 | 65 6e 74 2e 6d 6f 64 69 |if(theEv|ent.modi| |000022b0| 66 69 65 72 73 20 26 20 | 63 6d 64 4b 65 79 29 20 |fiers & |cmdKey) | |000022c0| 73 77 69 74 63 68 28 74 | 68 65 45 76 65 6e 74 2e |switch(t|heEvent.| |000022d0| 6d 65 73 73 61 67 65 20 | 26 20 63 68 61 72 43 6f |message |& charCo| |000022e0| 64 65 4d 61 73 6b 29 20 | 7b 0d 09 09 09 09 09 09 |deMask) |{.......| |000022f0| 63 61 73 65 20 27 2e 27 | 3a 0d 09 09 09 09 09 09 |case '.'|:.......| |00002300| 63 61 73 65 20 27 77 27 | 3a 0d 09 09 09 09 09 09 |case 'w'|:.......| |00002310| 64 6f 6e 65 3d 31 3b 0d | 09 09 09 09 09 7d 0d 09 |done=1;.|.....}..| |00002320| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 09 63 |....brea|k;.....c| |00002330| 61 73 65 20 6d 6f 75 73 | 65 44 6f 77 6e 3a 0d 09 |ase mous|eDown:..| |00002340| 09 09 09 09 75 70 64 61 | 74 65 3d 31 3b 0d 09 09 |....upda|te=1;...| |00002350| 09 09 09 77 69 6e 64 6f | 77 45 76 65 6e 74 3d 46 |...windo|wEvent=F| |00002360| 69 6e 64 57 69 6e 64 6f | 77 28 74 68 65 45 76 65 |indWindo|w(theEve| |00002370| 6e 74 2e 77 68 65 72 65 | 2c 26 61 57 69 6e 64 6f |nt.where|,&aWindo| |00002380| 77 29 3b 0d 09 09 09 09 | 09 69 66 28 61 57 69 6e |w);.....|.if(aWin| |00002390| 64 6f 77 3d 3d 77 69 6e | 64 6f 77 29 7b 0d 09 09 |dow==win|dow){...| |000023a0| 09 09 09 09 73 77 69 74 | 63 68 28 77 69 6e 64 6f |....swit|ch(windo| |000023b0| 77 45 76 65 6e 74 29 7b | 0d 09 09 09 09 09 09 63 |wEvent){|.......c| |000023c0| 61 73 65 20 69 6e 44 72 | 61 67 3a 0d 09 09 09 09 |ase inDr|ag:.....| |000023d0| 09 09 09 44 72 61 67 57 | 69 6e 64 6f 77 28 77 69 |...DragW|indow(wi| |000023e0| 6e 64 6f 77 2c 74 68 65 | 45 76 65 6e 74 2e 77 68 |ndow,the|Event.wh| |000023f0| 65 72 65 2c 26 71 64 2e | 73 63 72 65 65 6e 42 69 |ere,&qd.|screenBi| |00002400| 74 73 2e 62 6f 75 6e 64 | 73 29 3b 0d 09 09 09 09 |ts.bound|s);.....| |00002410| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 09 09 |...break|;.......| |00002420| 63 61 73 65 20 69 6e 47 | 6f 41 77 61 79 3a 0d 09 |case inG|oAway:..| |00002430| 09 09 09 09 09 09 64 6f | 6e 65 3d 54 72 61 63 6b |......do|ne=Track| |00002440| 47 6f 41 77 61 79 28 77 | 69 6e 64 6f 77 2c 74 68 |GoAway(w|indow,th| |00002450| 65 45 76 65 6e 74 2e 77 | 68 65 72 65 29 3b 0d 09 |eEvent.w|here);..| |00002460| 09 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....| |00002470| 09 09 09 63 61 73 65 20 | 69 6e 47 72 6f 77 3a 0d |...case |inGrow:.| |00002480| 09 09 09 09 09 09 09 72 | 2e 74 6f 70 3d 72 2e 6c |.......r|.top=r.l| |00002490| 65 66 74 3d 33 32 2b 53 | 43 52 4f 4c 4c 5f 42 41 |eft=32+S|CROLL_BA| |000024a0| 52 3b 09 2f 2a 20 6d 69 | 6e 69 6d 75 6d 20 73 69 |R;./* mi|nimum si| |000024b0| 7a 65 20 2a 2f 0d 09 09 | 09 09 09 09 09 72 2e 62 |ze */...|.....r.b| |000024c0| 6f 74 74 6f 6d 3d 72 2e | 72 69 67 68 74 3d 31 30 |ottom=r.|right=10| |000024d0| 32 34 2b 53 43 52 4f 4c | 4c 5f 42 41 52 3b 09 2f |24+SCROL|L_BAR;./| |000024e0| 2a 20 6d 61 78 20 73 69 | 7a 65 20 2a 2f 0d 09 09 |* max si|ze */...| |000024f0| 09 09 09 09 09 72 65 53 | 69 7a 65 20 3d 20 47 72 |.....reS|ize = Gr| |00002500| 6f 77 57 69 6e 64 6f 77 | 28 77 69 6e 64 6f 77 2c |owWindow|(window,| |00002510| 74 68 65 45 76 65 6e 74 | 2e 77 68 65 72 65 2c 26 |theEvent|.where,&| |00002520| 72 29 3b 0d 09 09 09 09 | 09 09 09 62 72 65 61 6b |r);.....|...break| |00002530| 3b 0d 09 09 09 09 09 09 | 63 61 73 65 20 69 6e 5a |;.......|case inZ| |00002540| 6f 6f 6d 49 6e 3a 0d 09 | 09 09 09 09 09 63 61 73 |oomIn:..|.....cas| |00002550| 65 20 69 6e 5a 6f 6f 6d | 4f 75 74 3a 0d 09 09 09 |e inZoom|Out:....| |00002560| 09 09 09 09 5a 6f 6f 6d | 28 77 69 6e 64 6f 77 2c |....Zoom|(window,| |00002570| 77 69 6e 64 6f 77 45 76 | 65 6e 74 29 3b 0d 09 09 |windowEv|ent);...| |00002580| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....| |00002590| 09 09 63 61 73 65 20 69 | 6e 43 6f 6e 74 65 6e 74 |..case i|nContent| |000025a0| 3a 0d 09 09 09 09 09 09 | 09 62 72 65 61 6b 3b 0d |:.......|.break;.| |000025b0| 09 09 09 09 09 09 64 65 | 66 61 75 6c 74 3a 0d 09 |......de|fault:..| |000025c0| 09 09 09 09 09 09 75 70 | 64 61 74 65 3d 30 3b 0d |......up|date=0;.| |000025d0| 09 09 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...| |000025e0| 09 09 09 09 7d 0d 09 09 | 09 09 09 09 62 72 65 61 |....}...|....brea| |000025f0| 6b 3b 0d 09 09 09 09 09 | 7d 0d 09 09 09 09 09 62 |k;......|}......b| |00002600| 72 65 61 6b 3b 0d 09 09 | 09 09 7d 0d 09 09 09 7d |reak;...|..}....}| |00002610| 09 09 09 0d 09 09 09 69 | 66 28 75 70 64 61 74 65 |.......i|f(update| |00002620| 20 7c 7c 20 64 6f 6e 65 | 29 62 72 65 61 6b 3b 0d | || done|)break;.| |00002630| 09 09 7d 0d 09 09 69 66 | 28 64 6f 6e 65 29 62 72 |..}...if|(done)br| |00002640| 65 61 6b 3b 0d 09 7d 0d | 09 53 65 74 50 6f 72 74 |eak;..}.|.SetPort| |00002650| 28 6f 6c 64 50 6f 72 74 | 29 3b 0d 09 44 69 73 70 |(oldPort|);..Disp| |00002660| 6f 73 65 52 67 6e 28 69 | 67 6e 6f 72 65 52 67 6e |oseRgn(i|gnoreRgn| |00002670| 29 3b 0d 09 44 69 73 70 | 6f 73 50 74 72 28 62 75 |);..Disp|osPtr(bu| |00002680| 66 66 65 72 2e 62 61 73 | 65 41 64 64 72 29 3b 0d |ffer.bas|eAddr);.| |00002690| 09 44 69 73 70 6f 73 65 | 57 69 6e 64 6f 77 28 77 |.Dispose|Window(w| |000026a0| 69 6e 64 6f 77 29 3b 0d | 7d 0d 0d 42 6f 6f 6c 65 |indow);.|}..Boole| |000026b0| 61 6e 20 5a 6f 6f 6d 65 | 64 4f 75 74 28 57 69 6e |an Zoome|dOut(Win| |000026c0| 64 6f 77 50 74 72 20 77 | 29 0d 2f 2a 20 44 65 74 |dowPtr w|)./* Det| |000026d0| 65 72 6d 69 6e 65 20 77 | 68 65 74 68 65 72 20 77 |ermine w|hether w| |000026e0| 69 6e 64 6f 77 20 69 73 | 20 22 73 74 61 6e 64 61 |indow is| "standa| |000026f0| 72 64 22 20 73 69 7a 65 | 2c 20 69 2e 65 2e 20 7a |rd" size|, i.e. z| |00002700| 6f 6f 6d 65 64 20 6f 75 | 74 2e 20 2a 2f 0d 7b 0d |oomed ou|t. */.{.| |00002710| 09 50 6f 69 6e 74 20 70 | 74 3b 0d 09 52 65 63 74 |.Point p|t;..Rect| |00002720| 20 72 2c 6d 79 52 65 63 | 74 3b 0d 09 42 6f 6f 6c | r,myRec|t;..Bool| |00002730| 65 61 6e 20 7a 6f 6f 6d | 65 64 4f 75 74 3b 0d 09 |ean zoom|edOut;..| |00002740| 0d 09 6d 79 52 65 63 74 | 3d 28 2a 28 28 57 53 74 |..myRect|=(*((WSt| |00002750| 61 74 65 44 61 74 61 20 | 2a 2a 29 28 28 57 69 6e |ateData |**)((Win| |00002760| 64 6f 77 50 65 65 6b 29 | 77 29 2d 3e 64 61 74 61 |dowPeek)|w)->data| |00002770| 48 61 6e 64 6c 65 29 29 | 2d 3e 73 74 64 53 74 61 |Handle))|->stdSta| |00002780| 74 65 3b 0d 09 70 74 2e | 68 3d 30 3b 0d 09 70 74 |te;..pt.|h=0;..pt| |00002790| 2e 76 3d 30 3b 0d 09 4c | 6f 63 61 6c 54 6f 47 6c |.v=0;..L|ocalToGl| |000027a0| 6f 62 61 6c 28 26 70 74 | 29 3b 0d 09 72 20 3d 20 |obal(&pt|);..r = | |000027b0| 77 2d 3e 70 6f 72 74 52 | 65 63 74 3b 0d 09 4f 66 |w->portR|ect;..Of| |000027c0| 66 73 65 74 52 65 63 74 | 28 26 72 2c 70 74 2e 68 |fsetRect|(&r,pt.h| |000027d0| 2c 70 74 2e 76 29 3b 0d | 09 7a 6f 6f 6d 65 64 4f |,pt.v);.|.zoomedO| |000027e0| 75 74 3d 72 2e 74 6f 70 | 3d 3d 6d 79 52 65 63 74 |ut=r.top|==myRect| |000027f0| 2e 74 6f 70 0d 09 09 26 | 26 20 72 2e 6c 65 66 74 |.top...&|& r.left| |00002800| 3d 3d 6d 79 52 65 63 74 | 2e 6c 65 66 74 0d 09 09 |==myRect|.left...| |00002810| 26 26 20 72 2e 62 6f 74 | 74 6f 6d 3d 3d 6d 79 52 |&& r.bot|tom==myR| |00002820| 65 63 74 2e 62 6f 74 74 | 6f 6d 0d 09 09 26 26 20 |ect.bott|om...&& | |00002830| 72 2e 72 69 67 68 74 3d | 3d 6d 79 52 65 63 74 2e |r.right=|=myRect.| |00002840| 72 69 67 68 74 3b 0d 09 | 72 65 74 75 72 6e 20 7a |right;..|return z| |00002850| 6f 6f 6d 65 64 4f 75 74 | 3b 0d 7d 00 00 00 00 00 |oomedOut|;.}.....| |00002860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002880| 00 00 01 00 00 00 01 8a | 00 00 00 8a 00 00 00 52 |........|.......R| |00002890| 6e 00 18 fe aa 42 6e fe | b0 42 67 48 6e fe 94 42 |n....Bn.|.BgHn..B| |000028a0| 67 4e ba 04 72 3d 5f fe | 92 4a 6e fe 92 66 0a 20 |gN..r=_.|.Jn..f. | |000028b0| 0b 53 61 6e 64 73 74 6f | 72 6d 2e 63 02 00 00 00 |.Sandsto|rm.c....| |000028c0| 54 45 58 54 4b 41 48 4c | 00 00 00 00 00 00 00 00 |TEXTKAHL|........| |000028d0| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......| |000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000028f0| 00 00 a7 e5 d5 84 00 00 | 00 00 00 00 01 dc 01 42 |........|.......B| |00002900| 2e fe f6 41 ee fe f6 2d | 48 fe 9c 3d 7c ff ff fe |...A...-|H..=|...| |00002910| a0 3d 46 fe a6 2d 6e ff | f6 fe ba 42 67 48 6e fe |.=F..-n.|...BgHn.| |00002920| 8a 42 67 4e ba 03 f0 3a | 1f 4a 45 57 c0 2f 00 42 |.BgN...:|.JEW./.B| |00002930| 67 48 6e fe a8 72 03 2f | 01 a8 5d 12 1f 20 1f 0a |gHn..r./|..].. ..| |00002940| 01 00 01 c0 01 41 ee fe | aa 43 fa 00 72 72 03 b1 |.....A..|.C..rr..| |00002950| 09 56 c9 ff fc 57 c1 c0 | 01 67 48 2f 0c 48 7a 00 |.V...W..|.gH/.Hz.| |00002960| 5a a9 33 2f 0b 48 7a 00 | 52 a9 33 2f 0c 3f 07 48 |Z.3/.Hz.|R.3/.?.H| |00002970| 6e fe f6 a9 47 2f 0b 3f | 07 48 6e fe f6 a9 47 70 |n...G/.?|.Hn...Gp| |00002980| 00 00 00 18 00 01 00 16 | 00 00 20 78 00 de 00 4f |........|.. x...O| |00002990| d2 3c 00 00 07 73 72 63 | 43 6f 70 79 00 00 00 48 |.<...src|Copy...H| |000029a0| 00 09 4d 6f 6e 61 63 6f | 00 50 00 81 00 50 00 82 |..Monaco|.P...P..| |000029b0| 00 50 01 17 00 50 01 77 | 00 5b 00 00 00 5b 00 09 |.P...P.w|.[...[..| |000029c0| 00 5b 00 06 00 04 00 3c | 00 24 01 8d 02 3d 00 3c |.[.....<|.$...=.<| |000029d0| 00 24 01 8d 02 3d a7 76 | 89 02 00 00 0f 58 00 00 |.$...=.v|.....X..| |000029e0| 0f 8d 00 00 0e b7 01 00 | 00 00 00 1e 00 3c 00 24 |........|.....<.$| |000029f0| 01 8d 02 3d 00 3c 00 24 | 01 8d 02 3d 00 00 0e b7 |...=.<.$|...=....| |00002a00| 00 00 00 00 00 00 00 00 | 00 00 00 00 01 00 00 00 |........|........| |00002a10| 01 8a 00 00 00 8a 00 00 | 00 52 00 5f 4d b0 14 34 |........|.R._M..4| |00002a20| 00 00 00 1c 00 52 00 01 | 44 54 56 55 00 00 00 12 |.....R..|DTVU....| |00002a30| 4d 50 53 52 00 01 00 1e | 57 bc ff ff 00 00 00 00 |MPSR....|W.......| |00002a40| 00 00 00 00 03 ed ff ff | 00 00 00 1c 00 00 00 00 |........|........| |00002a50| 03 f0 ff ff 00 00 00 68 | 00 00 00 00 00 00 00 00 |.......h|........| |00002a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+